package com.aaa.service.system;

import com.aaa.entity.PageSortEntity;
import com.aaa.entity.system.Dept;
import com.github.pagehelper.Page;

import java.util.List;


/**
 * 部门表(Dept)表服务接口
 *
 * @author makejava
 * @since 2022-08-30 20:06:58
 */
public interface DeptService {
    /**
     * @param dept
     * @return
     * @create by: 张恒
     * @description: 查询所有带分页
     * @create time: 2022/8/30 10:39
     */
    Page queryDeptPage(PageSortEntity pageSortEntity, Dept dept);


    /**
     * @param
     * @return
     * @create by: 张恒
     * @description: 查询所有，不带分页，实体类
     * @create time: 2022/9/3 9:28
     */
    List<Dept> queryAllDept();


    /**
     * @param dept
     * @return
     * @create by: 张恒
     * @description: 添加
     * @create time: 2022/8/31 9:23
     */
    boolean insertDept(Dept dept);


    /**
     * @param dept
     * @return
     * @create by: 张恒
     * @description: 修改
     * @create time: 2022/8/31 9:23
     */
    boolean updateDept(Dept dept);


    /**
     * @param id
     * @return
     * @create by: 张恒
     * @description: 删除
     * @create time: 2022/8/31 9:23
     */
    boolean deleteDeptById(Integer[] id);

    /**
     * 联合userinfo表查部门中的人数
     */
    Integer selectDeptUser(Integer deptId);


    /**
     * @param dept
     * @return
     * @create by: 张恒
     * @description: 添加修改部门名称时的唯一效验
     * @create time: 2022/8/31 18:47
     */
    boolean repetitionName(Dept dept);


}
